# for in 1
print('='*80)
for row in range(1,10):
    for col in range(1,row+1):
        print('{}*{}={:<3}'.format(row, col, row*col),end=' ')
    print('')
print('='*80)
# for in 2
for row in range(9,0,-1):
    for col in range(1,row+1):
        print('{}*{}={:<3}'.format(row, col, row*col),end=' ')
    print('')
print('='*80)
# for in 3
for row in range(1,10):
    for col in range(1,10):
        if row>col:
            print('       ',end=' ')
        else:
            print('{}*{}={:<3}'.format(row, col, row*col),end=' ')
    print('')
print('='*80)
# for in 4
for row in range(9,0,-1):
    for col in range(1,10):
        if row>col:
            print('       ',end=' ')
        else:
            print('{}*{}={:<3}'.format(row, col, row*col),end=' ')
    print('')
